package com.zhh.srforum.enums;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: Zhao Haihang
 * @Date: 2020/11/26/16:06
 * @Description:
 */
public enum CommentTypeEnum {
    QUESTION(1),
    COMMENT(2);
    private Integer type;

    CommentTypeEnum( Integer type) {
        this.type = type;
    }

    public Integer getType(){
        return type;
    }

    public static boolean isExist(Integer type){
        for(CommentTypeEnum commentTypeEnum : CommentTypeEnum.values()){
            if(commentTypeEnum.getType() == type){
                return true;
            }
        }
        return false;
    }
}
